#! /usr/bin/env python

def options(opt):
	opt.load('compiler_c')

def configure(conf):
	conf.load('compiler_c')
	conf.check(header_name='time.h', features='c cprogram')
	conf.check_cc(function_name='printf', header_name="stdio.h")
	conf.check_cc(fragment='int main() {2+2==4;}\n', define_name="boobah")
	conf.check_cc(lib='m', cflags='-Wall', defines=['var=foo', 'x=y'], uselib_store='M')
	#conf.check_cxx(lib='linux', use='M', cxxflags='-O2')

	conf.check_cc(fragment='''
            #include <stdio.h>
            int main() { printf("4"); return 0; } ''',
        define_name = "booeah",
        execute     = True,
        define_ret  = True,
        msg         = "Checking for something")

	conf.write_config_header('config.h')
